The present invention relates to a data recorder, and more particularly, to a controller for a data recorder which has a buffer memory for storing data provided from an external device and records the stored data of the buffer memory on a recording medium.
An optical disc recorder records data on an optical disc, which serves as a recording medium. A CD-DA family compact disc-recordable (CD-R) drive is one type of optical disc recorder that is widely used. A CD-R is a so-called write-once optical disc on which data is written only once. The recorded data cannot be physically deleted. A laser beam is irradiated against the optical disc from an optical head of the CD-R drive. The heat of the laser beam melts a dye and forms recording pits on a recording layer of the optical disc. Data is recorded on the disc by changing the reflecting rate of the recording layer.
The optical disc recorder includes a buffer memory and an encoder. The buffer memory temporarily stores data provided from an external device, such as a personal computer. The encoder reads the data from the buffer memory and encodes the read data to record the data on the optical disc.
In such an optical disc recorder, if, for example, the rate of data transmission from the external device is slower than the recording data transmission rate of the optical disc (write speed), the transmission rate of the recording data output from the encoder is faster than the transmission rate of the data provided to the buffer. This decreases the amount of data stored in the buffer memory. If the decrease continues, the data amount ultimately becomes null and the buffer memory becomes empty. This stops the stream of data to the encoder and causes an interruption in the data recorded on the optical disc. This problem is referred to as buffer underrun. The interruption in the data recorded on the optical disc resulting from buffer underrun is referred to as a buffer underrun error.
Data is recorded on an optical disc using a recording technique that designates the file group recorded on the optical disc (e.g., disc at once, track at once). Thus, if a buffer underrun error occurs, the entire optical disc becomes unusable when employing disc at once, and the track undergoing recording becomes unusable when employing track at once.
Recent CD-R drives record data at a speed four times or eight times the normal recording speed. Further, recent personal computers have multitasking functions to operate CD-R drives. This has increased the tendency of the occurrence of buffer underrun errors.
Packet writing is one type of data recording that records data in packet units. Packet writing records data on an optical disc when the data reaches the capacity of the packet. This prevents the occurrence of buffer underrun errors. However, link blocks must be formed to connect packets in packet writing. The link blocks decrease the recording capacity of the optical disc. Further, there are CD-ROM drives that are not capable of handling packet writing. Such CD-ROM drives cannot reproduce data written to optical discs through packet writing. In other words, the CD-ROM compatibility required by the CD-R standard (Orange Book Part II) does not include packet writing. For example, packet writing cannot be applied for a CD-DA player. Thus, a CD-R drive cannot record CD-DA audio data through packet writing. Accordingly, there is a need for preventing buffer underrun errors without employing packet writing.
A CD-rewritable (CD-RW) drive is another type of optical disc recorder that is widely used. A CD-RW drive irradiates a laser beam from an optical head against an optical disc. The heat of the laser beam causes phase changes between amorphic and crystalline to form recording pits on the recording layer of the optical disc. This changes the reflecting rate of the recording layer and records data on the optical disc. Data can be repeatedly rewritten to optical discs used by the CD-RW drive. Accordingly, the optical disc remains usable even if a buffer underrun error occurs. However, when a buffer underrun error occurs, the data file that was being recorded before the occurrence of the buffer underrun error must be recorded again. This wastes the recording performed prior to the occurrence of the buffer underrun error and increases the recording time.
A magneto-optic disc recorder is another type of known data recorder. The magneto-optic disc recorder irradiates a laser beam from an optical head against a magneto-optic disc. This applies residual magnetization to the recording layer of the optical disc and records data on the magneto-optic disc. Mini disc (MD) drives are widely used magneto-optic disc recorders. However, MD drives have the same problem as CD-RW drives.
It is an object of the present invention to provide a controller for a controller for a data recorder that controls data recording in a manner that the continuity of the data is ensured even if the recording of data to a recording medium is interrupted.
To achieve the above object, the present invention provides a controller for interrupting and restarting data writing to a recording medium. The data is read from a buffer memory. The controller includes an address memory for storing at least one of an address of the recording medium and an address of the buffer memory when the writing of data to the recording medium is interrupted. Each address indicates a location of data when the interruption occurred. A synchronizing circuit sequentially reads data written to the recording medium prior to the interruption and data stored in the buffer memory prior to the interruption and synchronizes the written data and the stored data. A restart circuit restarts data writing to the recording medium when at least one of an address of data read from the recording medium and an address of data read from the buffer memory matches the address stored in the address memory. The restart circuit suspends the restarting and the synchronizing circuit repeats the reading and synchronizing of data when one of the address of the data read from the recording medium and the address of the data read from the buffer memory matches the address stored in the address memory before the synchronizing circuit completes the data synchronization.
A further aspect of the present invention provides a controller for interrupting and restarting data writing to a recording medium. The data is read from a buffer memory. The controller includes a first address memory for storing an address of the recording medium when the data writing is interrupted. The recording medium address indicates a location of data when the interruption occurred. A second address memory stores an address of the buffer memory when the writing of data to the recording medium is interrupted. The buffer memory address indicates a location of the data when the interruption occurred. A synchronizing circuit sequentially reads the data written to the recording medium prior to the interruption and the data stored in the buffer memory prior to the interruption while synchronizing the written data and the stored data. A first location detection circuit generates a first instruction signal to restart data writing when the address of the data read from the recording medium matches the address stored in the first address memory. A second location detection circuit generates a second instruction signal to restart data writing when the address of the data read from the buffer memory by the synchronizing circuit matches the address stored in the second address memory. A determination circuit is connected to the first and second location detection circuits to determine whether to restart the writing of data based on the first and second instruction signals.
Another aspect of the present invention provides a method for controlling data writing to a recording medium when writing is interrupted. The data is read from a buffer memory. The method includes storing at least one of an address of the recording medium and an address of the buffer memory in an address memory when writing to the recording medium is interrupted. Each address indicates a location of the data when the interruption occurred. The method further includes sequentially reading data written to the recording medium prior to the interruption and the data stored in the buffer memory prior to the interruption, synchronizing the written data and the stored data, restarting the writing of data to the recording medium when at least one of an address of the data read from the recording medium and an address of the data read from the buffer memory by the synchronizing circuit matches the address stored in the address memory, and repeating the data reading and the data synchronizing when the address of the data read from the recording medium or the address read from the buffer memory matches the address stored in the address memory before completion of the data synchronization in the data synchronization step.
A further aspect of the present invention provides a method for controlling data writing to a recording medium when writing is interrupted. The data is read from a buffer memory. The method includes storing an address of the recording medium when writing of data to the recording medium is interrupted and storing an address of the buffer memory when the writing of data to the recording medium is interrupted. The recording medium address indicates a location of the data when the interruption occurred. The buffer memory address indicates a location of the data when the interruption occurred. The method further includes sequentially reading the data written to the recording medium prior to the interruption and the data stored in the buffer memory prior to the interruption, synchronizing the written data and the stored data, generating a first instruction signal to restart data writing when the address of the data read from the recording medium matches the address stored in the first address memory, generating a second instruction signal to restart data writing when the address of the data read from the buffer memory by the synchronizing circuit matches the address stored in the second address memory, and determining whether to restart the writing of data based on the first and second instruction signals.
Other aspects and advantages of the present invention will become apparent from the following description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention.